Integrand size = 20, antiderivative size = 131 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^2} \, dx=\frac {\left (3 c^2 d^2+b^2 e^2-2 c e (2 b d-a e)\right ) x}{e^4}-\frac {c (c d-b e) x^2}{e^3}+\frac {c^2 x^3}{3 e^2}-\frac {\left (c d^2-b d e+a e^2\right )^2}{e^5 (d+e x)}-\frac {2 (2 c d-b e) \left (c d^2-b d e+a e^2\right ) \log (d+e x)}{e^5} \]
(3*c^2*d^2+b^2*e^2-2*c*e*(-a*e+2*b*d))*x/e^4-c*(-b*e+c*d)*x^2/e^3+1/3*c^2* x^3/e^2-(a*e^2-b*d*e+c*d^2)^2/e^5/(e*x+d)-2*(-b*e+2*c*d)*(a*e^2-b*d*e+c*d^ 2)*ln(e*x+d)/e^5
Time = 0.07 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.97 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^2} \, dx=\frac {3 e \left (3 c^2 d^2+b^2 e^2+2 c e (-2 b d+a e)\right ) x+3 c e^2 (-c d+b e) x^2+c^2 e^3 x^3-\frac {3 \left (c d^2+e (-b d+a e)\right )^2}{d+e x}-6 (2 c d-b e) \left (c d^2+e (-b d+a e)\right ) \log (d+e x)}{3 e^5} \]
(3*e*(3*c^2*d^2 + b^2*e^2 + 2*c*e*(-2*b*d + a*e))*x + 3*c*e^2*(-(c*d) + b* e)*x^2 + c^2*e^3*x^3 - (3*(c*d^2 + e*(-(b*d) + a*e))^2)/(d + e*x) - 6*(2*c *d - b*e)*(c*d^2 + e*(-(b*d) + a*e))*Log[d + e*x])/(3*e^5)
Time = 0.33 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1140, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^2} \, dx\) |
\(\Big \downarrow \) 1140 |
\(\displaystyle \int \left (\frac {-2 c e (2 b d-a e)+b^2 e^2+3 c^2 d^2}{e^4}+\frac {\left (a e^2-b d e+c d^2\right )^2}{e^4 (d+e x)^2}+\frac {2 (b e-2 c d) \left (a e^2-b d e+c d^2\right )}{e^4 (d+e x)}-\frac {2 c x (c d-b e)}{e^3}+\frac {c^2 x^2}{e^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {x \left (-2 c e (2 b d-a e)+b^2 e^2+3 c^2 d^2\right )}{e^4}-\frac {\left (a e^2-b d e+c d^2\right )^2}{e^5 (d+e x)}-\frac {2 (2 c d-b e) \log (d+e x) \left (a e^2-b d e+c d^2\right )}{e^5}-\frac {c x^2 (c d-b e)}{e^3}+\frac {c^2 x^3}{3 e^2}\) |
((3*c^2*d^2 + b^2*e^2 - 2*c*e*(2*b*d - a*e))*x)/e^4 - (c*(c*d - b*e)*x^2)/ e^3 + (c^2*x^3)/(3*e^2) - (c*d^2 - b*d*e + a*e^2)^2/(e^5*(d + e*x)) - (2*( 2*c*d - b*e)*(c*d^2 - b*d*e + a*e^2)*Log[d + e*x])/e^5
3.22.24.3.1 Defintions of rubi rules used
Int[((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x _Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 0]
Time = 3.18 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.40
method | result | size |
default | \(\frac {\frac {1}{3} c^{2} e^{2} x^{3}+b c \,e^{2} x^{2}-c^{2} d e \,x^{2}+2 a c \,e^{2} x +b^{2} e^{2} x -4 b c d e x +3 c^{2} d^{2} x}{e^{4}}-\frac {a^{2} e^{4}-2 a b d \,e^{3}+2 a c \,d^{2} e^{2}+b^{2} d^{2} e^{2}-2 d^{3} e b c +c^{2} d^{4}}{e^{5} \left (e x +d \right )}+\frac {\left (2 a b \,e^{3}-4 d \,e^{2} a c -2 b^{2} d \,e^{2}+6 b c e \,d^{2}-4 c^{2} d^{3}\right ) \ln \left (e x +d \right )}{e^{5}}\) | \(183\) |
norman | \(\frac {\frac {\left (2 a c \,e^{2}+b^{2} e^{2}-3 b c d e +2 c^{2} d^{2}\right ) x^{2}}{e^{3}}+\frac {\left (a^{2} e^{4}-2 a b d \,e^{3}+4 a c \,d^{2} e^{2}+2 b^{2} d^{2} e^{2}-6 d^{3} e b c +4 c^{2} d^{4}\right ) x}{d \,e^{4}}+\frac {c^{2} x^{4}}{3 e}+\frac {c \left (3 b e -2 c d \right ) x^{3}}{3 e^{2}}}{e x +d}+\frac {2 \left (a b \,e^{3}-2 d \,e^{2} a c -b^{2} d \,e^{2}+3 b c e \,d^{2}-2 c^{2} d^{3}\right ) \ln \left (e x +d \right )}{e^{5}}\) | \(188\) |
risch | \(\frac {c^{2} x^{3}}{3 e^{2}}+\frac {b c \,x^{2}}{e^{2}}-\frac {c^{2} d \,x^{2}}{e^{3}}+\frac {2 a c x}{e^{2}}+\frac {b^{2} x}{e^{2}}-\frac {4 b c d x}{e^{3}}+\frac {3 c^{2} d^{2} x}{e^{4}}-\frac {a^{2}}{e \left (e x +d \right )}+\frac {2 a b d}{e^{2} \left (e x +d \right )}-\frac {2 a c \,d^{2}}{e^{3} \left (e x +d \right )}-\frac {b^{2} d^{2}}{e^{3} \left (e x +d \right )}+\frac {2 d^{3} b c}{e^{4} \left (e x +d \right )}-\frac {c^{2} d^{4}}{e^{5} \left (e x +d \right )}+\frac {2 \ln \left (e x +d \right ) a b}{e^{2}}-\frac {4 \ln \left (e x +d \right ) d a c}{e^{3}}-\frac {2 \ln \left (e x +d \right ) b^{2} d}{e^{3}}+\frac {6 \ln \left (e x +d \right ) b c \,d^{2}}{e^{4}}-\frac {4 \ln \left (e x +d \right ) c^{2} d^{3}}{e^{5}}\) | \(246\) |
parallelrisch | \(\frac {6 x^{2} a c \,e^{4}+6 a b d \,e^{3}-6 b^{2} d^{2} e^{2}-3 a^{2} e^{4}-12 \ln \left (e x +d \right ) c^{2} d^{4}+6 x^{2} c^{2} d^{2} e^{2}+18 \ln \left (e x +d \right ) x b c \,d^{2} e^{2}-12 c^{2} d^{4}+c^{2} x^{4} e^{4}-12 \ln \left (e x +d \right ) x a c d \,e^{3}-12 \ln \left (e x +d \right ) x \,c^{2} d^{3} e +18 d^{3} e b c -2 x^{3} c^{2} d \,e^{3}+3 x^{2} b^{2} e^{4}+3 x^{3} b c \,e^{4}-6 \ln \left (e x +d \right ) b^{2} d^{2} e^{2}-9 x^{2} b c d \,e^{3}+6 \ln \left (e x +d \right ) a b d \,e^{3}-12 \ln \left (e x +d \right ) a c \,d^{2} e^{2}+18 \ln \left (e x +d \right ) b c \,d^{3} e +6 \ln \left (e x +d \right ) x a b \,e^{4}-6 \ln \left (e x +d \right ) x \,b^{2} d \,e^{3}-12 a c \,d^{2} e^{2}}{3 e^{5} \left (e x +d \right )}\) | \(298\) |
1/e^4*(1/3*c^2*e^2*x^3+b*c*e^2*x^2-c^2*d*e*x^2+2*a*c*e^2*x+b^2*e^2*x-4*b*c *d*e*x+3*c^2*d^2*x)-(a^2*e^4-2*a*b*d*e^3+2*a*c*d^2*e^2+b^2*d^2*e^2-2*b*c*d ^3*e+c^2*d^4)/e^5/(e*x+d)+(2*a*b*e^3-4*a*c*d*e^2-2*b^2*d*e^2+6*b*c*d^2*e-4 *c^2*d^3)/e^5*ln(e*x+d)
Leaf count of result is larger than twice the leaf count of optimal. 259 vs. \(2 (129) = 258\).
Time = 0.28 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.98 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^2} \, dx=\frac {c^{2} e^{4} x^{4} - 3 \, c^{2} d^{4} + 6 \, b c d^{3} e + 6 \, a b d e^{3} - 3 \, a^{2} e^{4} - 3 \, {\left (b^{2} + 2 \, a c\right )} d^{2} e^{2} - {\left (2 \, c^{2} d e^{3} - 3 \, b c e^{4}\right )} x^{3} + 3 \, {\left (2 \, c^{2} d^{2} e^{2} - 3 \, b c d e^{3} + {\left (b^{2} + 2 \, a c\right )} e^{4}\right )} x^{2} + 3 \, {\left (3 \, c^{2} d^{3} e - 4 \, b c d^{2} e^{2} + {\left (b^{2} + 2 \, a c\right )} d e^{3}\right )} x - 6 \, {\left (2 \, c^{2} d^{4} - 3 \, b c d^{3} e - a b d e^{3} + {\left (b^{2} + 2 \, a c\right )} d^{2} e^{2} + {\left (2 \, c^{2} d^{3} e - 3 \, b c d^{2} e^{2} - a b e^{4} + {\left (b^{2} + 2 \, a c\right )} d e^{3}\right )} x\right )} \log \left (e x + d\right )}{3 \, {\left (e^{6} x + d e^{5}\right )}} \]
1/3*(c^2*e^4*x^4 - 3*c^2*d^4 + 6*b*c*d^3*e + 6*a*b*d*e^3 - 3*a^2*e^4 - 3*( b^2 + 2*a*c)*d^2*e^2 - (2*c^2*d*e^3 - 3*b*c*e^4)*x^3 + 3*(2*c^2*d^2*e^2 - 3*b*c*d*e^3 + (b^2 + 2*a*c)*e^4)*x^2 + 3*(3*c^2*d^3*e - 4*b*c*d^2*e^2 + (b ^2 + 2*a*c)*d*e^3)*x - 6*(2*c^2*d^4 - 3*b*c*d^3*e - a*b*d*e^3 + (b^2 + 2*a *c)*d^2*e^2 + (2*c^2*d^3*e - 3*b*c*d^2*e^2 - a*b*e^4 + (b^2 + 2*a*c)*d*e^3 )*x)*log(e*x + d))/(e^6*x + d*e^5)
Time = 0.47 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.30 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^2} \, dx=\frac {c^{2} x^{3}}{3 e^{2}} + x^{2} \left (\frac {b c}{e^{2}} - \frac {c^{2} d}{e^{3}}\right ) + x \left (\frac {2 a c}{e^{2}} + \frac {b^{2}}{e^{2}} - \frac {4 b c d}{e^{3}} + \frac {3 c^{2} d^{2}}{e^{4}}\right ) + \frac {- a^{2} e^{4} + 2 a b d e^{3} - 2 a c d^{2} e^{2} - b^{2} d^{2} e^{2} + 2 b c d^{3} e - c^{2} d^{4}}{d e^{5} + e^{6} x} + \frac {2 \left (b e - 2 c d\right ) \left (a e^{2} - b d e + c d^{2}\right ) \log {\left (d + e x \right )}}{e^{5}} \]
c**2*x**3/(3*e**2) + x**2*(b*c/e**2 - c**2*d/e**3) + x*(2*a*c/e**2 + b**2/ e**2 - 4*b*c*d/e**3 + 3*c**2*d**2/e**4) + (-a**2*e**4 + 2*a*b*d*e**3 - 2*a *c*d**2*e**2 - b**2*d**2*e**2 + 2*b*c*d**3*e - c**2*d**4)/(d*e**5 + e**6*x ) + 2*(b*e - 2*c*d)*(a*e**2 - b*d*e + c*d**2)*log(d + e*x)/e**5
Time = 0.20 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.34 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^2} \, dx=-\frac {c^{2} d^{4} - 2 \, b c d^{3} e - 2 \, a b d e^{3} + a^{2} e^{4} + {\left (b^{2} + 2 \, a c\right )} d^{2} e^{2}}{e^{6} x + d e^{5}} + \frac {c^{2} e^{2} x^{3} - 3 \, {\left (c^{2} d e - b c e^{2}\right )} x^{2} + 3 \, {\left (3 \, c^{2} d^{2} - 4 \, b c d e + {\left (b^{2} + 2 \, a c\right )} e^{2}\right )} x}{3 \, e^{4}} - \frac {2 \, {\left (2 \, c^{2} d^{3} - 3 \, b c d^{2} e - a b e^{3} + {\left (b^{2} + 2 \, a c\right )} d e^{2}\right )} \log \left (e x + d\right )}{e^{5}} \]
-(c^2*d^4 - 2*b*c*d^3*e - 2*a*b*d*e^3 + a^2*e^4 + (b^2 + 2*a*c)*d^2*e^2)/( e^6*x + d*e^5) + 1/3*(c^2*e^2*x^3 - 3*(c^2*d*e - b*c*e^2)*x^2 + 3*(3*c^2*d ^2 - 4*b*c*d*e + (b^2 + 2*a*c)*e^2)*x)/e^4 - 2*(2*c^2*d^3 - 3*b*c*d^2*e - a*b*e^3 + (b^2 + 2*a*c)*d*e^2)*log(e*x + d)/e^5
Time = 0.26 (sec) , antiderivative size = 257, normalized size of antiderivative = 1.96 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^2} \, dx=\frac {{\left (c^{2} - \frac {3 \, {\left (2 \, c^{2} d e - b c e^{2}\right )}}{{\left (e x + d\right )} e} + \frac {3 \, {\left (6 \, c^{2} d^{2} e^{2} - 6 \, b c d e^{3} + b^{2} e^{4} + 2 \, a c e^{4}\right )}}{{\left (e x + d\right )}^{2} e^{2}}\right )} {\left (e x + d\right )}^{3}}{3 \, e^{5}} + \frac {2 \, {\left (2 \, c^{2} d^{3} - 3 \, b c d^{2} e + b^{2} d e^{2} + 2 \, a c d e^{2} - a b e^{3}\right )} \log \left (\frac {{\left | e x + d \right |}}{{\left (e x + d\right )}^{2} {\left | e \right |}}\right )}{e^{5}} - \frac {\frac {c^{2} d^{4} e^{3}}{e x + d} - \frac {2 \, b c d^{3} e^{4}}{e x + d} + \frac {b^{2} d^{2} e^{5}}{e x + d} + \frac {2 \, a c d^{2} e^{5}}{e x + d} - \frac {2 \, a b d e^{6}}{e x + d} + \frac {a^{2} e^{7}}{e x + d}}{e^{8}} \]
1/3*(c^2 - 3*(2*c^2*d*e - b*c*e^2)/((e*x + d)*e) + 3*(6*c^2*d^2*e^2 - 6*b* c*d*e^3 + b^2*e^4 + 2*a*c*e^4)/((e*x + d)^2*e^2))*(e*x + d)^3/e^5 + 2*(2*c ^2*d^3 - 3*b*c*d^2*e + b^2*d*e^2 + 2*a*c*d*e^2 - a*b*e^3)*log(abs(e*x + d) /((e*x + d)^2*abs(e)))/e^5 - (c^2*d^4*e^3/(e*x + d) - 2*b*c*d^3*e^4/(e*x + d) + b^2*d^2*e^5/(e*x + d) + 2*a*c*d^2*e^5/(e*x + d) - 2*a*b*d*e^6/(e*x + d) + a^2*e^7/(e*x + d))/e^8
Time = 0.07 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.55 \[ \int \frac {\left (a+b x+c x^2\right )^2}{(d+e x)^2} \, dx=x\,\left (\frac {b^2+2\,a\,c}{e^2}+\frac {2\,d\,\left (\frac {2\,c^2\,d}{e^3}-\frac {2\,b\,c}{e^2}\right )}{e}-\frac {c^2\,d^2}{e^4}\right )-x^2\,\left (\frac {c^2\,d}{e^3}-\frac {b\,c}{e^2}\right )-\frac {a^2\,e^4-2\,a\,b\,d\,e^3+2\,a\,c\,d^2\,e^2+b^2\,d^2\,e^2-2\,b\,c\,d^3\,e+c^2\,d^4}{e\,\left (x\,e^5+d\,e^4\right )}-\frac {\ln \left (d+e\,x\right )\,\left (2\,b^2\,d\,e^2-6\,b\,c\,d^2\,e-2\,a\,b\,e^3+4\,c^2\,d^3+4\,a\,c\,d\,e^2\right )}{e^5}+\frac {c^2\,x^3}{3\,e^2} \]
x*((2*a*c + b^2)/e^2 + (2*d*((2*c^2*d)/e^3 - (2*b*c)/e^2))/e - (c^2*d^2)/e ^4) - x^2*((c^2*d)/e^3 - (b*c)/e^2) - (a^2*e^4 + c^2*d^4 + b^2*d^2*e^2 - 2 *a*b*d*e^3 - 2*b*c*d^3*e + 2*a*c*d^2*e^2)/(e*(d*e^4 + e^5*x)) - (log(d + e *x)*(4*c^2*d^3 + 2*b^2*d*e^2 - 2*a*b*e^3 + 4*a*c*d*e^2 - 6*b*c*d^2*e))/e^5 + (c^2*x^3)/(3*e^2)